<script type="text/javascript">
 $(document).ready( function(){	
		var buttons = { previous:$('#jslidernews2 .button-previous') ,
						next:$('#jslidernews2 .button-next') };			 
		$('#jslidernews2').lofJSidernews( { 
			interval:5000,
		 	easing:'easeInOutQuad',
			duration:1200,
			auto:true,
			mainWidth:695,
			mainHeight:300,
			navigatorHeight	: 60,
			navigatorWidth	: 240,
			maxItemDisplay:5,
			buttons:buttons } );						
	});
</script>

<?php 
	$mdlNewsItem=new Zendme_Models_NewsItem();
	$items=$mdlNewsItem->listItem(null,array('task'=>'public-news-slide'));
?>

<!--------------------CONTENT (Start) ----------------------->
<div class="content mar-top-20 width-100">
                	<div class="left">
                    
                    	<!--------------------slide-news (Start) ----------------------->
                    	<div class="slide-news">
                        	<!----------------------------------- jslidernews2 (start) ------------------------------------>
                            <div id="jslidernews2" class="lof-slidecontent" style="width:695px; height:300px;">
                                <div class="preload"><div></div></div>                
                                <!-- MAIN CONTENT --> 
                                <div class="main-slider-content" style="width:695px; height:300px;">
                                    <ul class="sliders-wrap-inner">
                                    	<?php foreach ($items as $item){ 
                                    	$picture=$item['picture'];
                                    	$slug=$item['slug'];
                                    	
                                    	?>
                                        <li><a href="<?php echo DOMAIN_URL."/tin-tuc/$slug.html" ?>"><img src="<?php echo FILES_URL."/news/orignal/$picture" ?>" title="" ></a></li>
                                        <?php } ?>
                                    </ul>
                                </div>
                                <!-- END MAIN CONTENT --> 
                                
                                <!-- NAVIGATOR -->
                                <div class="navigator-content">
                                    <div class="navigator-wrapper">
                                            <ul class="navigator-wrap-inner">
                                                <?php 
                                                	$mdlCutString=new Zendme_CutString();
                                                	foreach ($items as $item){ 
		                                    		$name=$item['name'];
		                                    		$name=$mdlCutString->cutTring(70, $name);
		                                    		$slug=$item['slug'];
		                                    	?>
	                                                <li>
	                                                    <div><h3><a style="color:#000"><?php echo $name ?></a></h3></div>
	                                                </li>
                                                <?php } ?>
                                             </ul>
                                    </div>
                                </div>
                                       
                            </div>
                            <!----------------------------------- jslidernews2 (start) ------------------------------------>
                        </div>
                        <!--------------------slide-news (End) ----------------------->
                        
                        
                    	<div class="content-left mar-top-20">
                        	<div class="group">
                            	<div class="sub-left color-main">
                                    <a class="link-sub" href="<?php echo DOMAIN_URL ?>"><img src="<?php echo TEMPLATE_SYSTEM1_URL ?>/images/icon/icon-home-noactive.png" alt=""  /></a>
                                    <p>Tin tức được quan tâm</p>
                                </div>
                                
                                
                                <?php 
                                $items= $mdlNewsItem->listItem(null,array('task'=>'public-news-feature'));                      
                               	foreach ($items as $key=> $item){
                               	$name= $item['name'];
                               	$summary=$item['summary'];
                               	$slug=$item['slug'];
                               	
                               	$image=$item['picture'];
                               	$urlImage=FILES_URL.'/news/images450x450/'.$image;
                               	if(empty($image)) $urlImage=TEMPLATE_SYSTEM1_URL."/images/img-news.png";
                               	
                                ?>           
                               
                                <div class="box-cnt col-0 width-100">
                                    <div class="cnt item">
                                        <div class="bor-img">
                                            <a href="<?php echo DOMAIN_URL."/tin-tuc/$slug.html" ?>">
                                                <img class="news-img" src="<?php echo $urlImage ?>" alt="" title="" />                          
                                            </a>
                                        </div>
                                        <div class="desc">
                                            <h2><a href="<?php echo DOMAIN_URL."/tin-tuc/$slug.html" ?>"><?php echo $name ?></a></h2>
                                            <p><?php echo $summary ?></p>
                                            <a href="<?php echo DOMAIN_URL."/tin-tuc/$slug.html" ?>" class="btn-readmore bag-readmore"><span>Xem chi tiết</span></a>
                                        </div>
                                    </div>
                                </div>
                                
                                <?php } ?>            
                            </div>
                            
                            <div class="group mar-top-40">
                                <div class="sub-left color-main">
                                    <a class="link-sub" href="<?php echo DOMAIN_URL ?>"><img src="<?php echo TEMPLATE_SYSTEM1_URL ?>/images/icon/icon-home-noactive.png" alt=""  /></a>
                                    <p>Sự kiện</p>
                                </div>
                              
                                <?php 
                                $items= $mdlNewsItem->listItem(array('slug'=>'su-kien'),array('task'=>'public-category'));
                               	foreach ($items as $key=> $item){
                               	$name= $item['name'];
                               	$slug=$item['slug'];
                               	$summary=$item['summary'];
                                ?>           
                                <div class="box-cnt col-0 width-100">
                                    <div class="cnt item bor-0 pad-0">
                                        <div class="bor-img">
                                            <a href="<?php echo DOMAIN_URL."/tin-tuc/$slug.html" ?>">
                                                <img class="news-img" src="<?php echo TEMPLATE_SYSTEM1_URL ?>/images/img-news.png" alt="tin tuc duoc quan tam" title="" />
                                            </a>
                                        </div>
                                        <div class="desc">
                                            <h2><a href="<?php echo DOMAIN_URL."/tin-tuc/$slug.html" ?>"><?php echo $name ?></a></h2>
                                            <p><?php echo $summary ?></p>
                                            <a href="<?php echo DOMAIN_URL."/tin-tuc/$slug.html" ?>" class="btn-readmore bag-readmore"><span>Xem chi tiết</span></a>
                                        </div>
                                    </div>
                                </div>
                                <?php } ?>
                       
                            </div>        
                            
                        </div>
                    </div>
                    
       
                   <?php echo $this->render('right.php') ?>
                                    
                </div>
<!--------------------CONTENT (End) ------------------------->